<html>
<head><meta charset="utf-8"><title>cfg_if · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cfg_if.html">cfg_if</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213901884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cfg_if/near/213901884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cfg_if.html#213901884">(Oct 20 2020 at 10:55)</a>:</h4>
<p>Implemented a quick hack to resolve cfg-if in std. It did work for std::os::unix, but not for std::arch. I wondered why, and, lo and behold, another magnificent hack:</p>
<p><a href="https://github.com/rust-lang/rust/blob/554633534c550d20715e5e1576702b1f035586ad/library/core/src/lib.rs#L274-L292">https://github.com/rust-lang/rust/blob/554633534c550d20715e5e1576702b1f035586ad/library/core/src/lib.rs#L274-L292</a></p>



<a name="213901939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cfg_if/near/213901939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cfg_if.html#213901939">(Oct 20 2020 at 10:56)</a>:</h4>
<p>The same is done for backtrace to include it in libstd while backtrace itself depends on libstd.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>